package com.scau.ums.service.imp.userInfo;

import com.scau.ums.mapper.MaintainerMapper;
import com.scau.ums.model.Maintainer;
import com.scau.ums.service.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author: 莫伟杰
 * date： 2019/8/2 16:44
 */
@Service
public class MaintainerInfoImp implements UserInfo {

    private MaintainerMapper maintainerMapper;

    @Autowired
    public MaintainerInfoImp(MaintainerMapper maintainerMapper) {
        this.maintainerMapper = maintainerMapper;
    }

    @Override
    public Maintainer getUser(String userId) {
        return maintainerMapper.selectByPrimaryKey(userId);
    }

    @Override
    public List<Maintainer> getAllUsers() {
        return maintainerMapper.selectByExample(null);
    }
}
